import java.util.Arrays;

public class Test9 {
    public boolean isPalindrome(int x) {
        boolean flag;
        String s1 = String.valueOf(x);
        int length = s1.length();
        char[] a = new char[length];
        for (int i = 0; i < length; i++) {
            a[length - 1 - i] = s1.charAt(i);
        }
        String s2 = String.valueOf(a);
        if (s1.equals(s2)) {
            System.out.println("true");
            flag = true;
        } else {
            flag = false;
            System.out.println("false");
        }
        System.out.println("flag:" + flag);
        return flag;
    }

    public static void main(String[] args) {
        Test9 t9 = new Test9();
        boolean palindrome = t9.isPalindrome(121);
        System.out.println(palindrome);
    }
}
